package com.kedi.welfarecenter.read.dao.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @ClassName	HuilaoactiveMapper
 * @author: 	dw
 * @date: 		2019/7/26	14:41
 */
@Mapper
public interface HuilaoactiveMapper {
	/**
	 * 					获取慧老活动对应得图片资源信息
	 * @return			findList
	 */
    @Select("select huilaoactive.active_id , title,huilaoimage.address from huilaoactive left join huilaoimage on huilaoimage.active_id=huilaoactive.active_id")
    List<Map<String,Object>> findList();
    
    /**
     * 					根据慧老活动id获取慧老活动对应得图片资源信息							
     * @param 			id
     * @return			findDitail
     */
    @Select("select huilaoactive.active_id , title,huilaoimage.address,content,activetheme,activetime,eventslogans,phone,contacts,email from huilaoactive left join\n" +
            " huilaoimage on huilaoimage.active_id=huilaoactive.active_id where huilaoactive.active_id=#{id}")
    Map<String,Object> findDitail(@Param("id") Integer id);
}
